import datetime

st = datetime.date(1900,1,1)
delta = datetime.timedelta(days = 1)
end = datetime.date(9999, 12, 31)

cnt = 0

while st <= end:
    if '2 'in str(st.year) or '2' in str(st.month) or '2' in str(st.day):
        cnt += 1
    try:
        st += delta
    except:
        print(cnt)
        break